package com.ebupt.migu.music.propagate.controller;

import com.ebupt.migu.music.commons.constants.ResultMsg;
import com.ebupt.migu.music.propagate.dto.SendDto;
import com.ebupt.migu.music.propagate.service.PropagateSendService;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 宣发短信下发调用
 *
 * @author tz
 */
@RestController
@AllArgsConstructor
@RequestMapping("/propagate")
public class PropagateSendController {

    @Autowired
    private PropagateSendService sendService;

    /**
     * 短信下发
     */
    @PostMapping("/send")
    public ResultMsg send(@Valid @RequestBody SendDto dto) {
        return sendService.send(dto);
    }


}
